import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import lianxi from '@/components/lianxi'
import houtai from '@/components/houtai'
import huoqu from '../components/zsgc/huoqu.vue'
import add from '../components/zsgc/add.vue'
import exit from '../components/zsgc/exit.vue'
import del from '../components/zsgc/del.vue'
import anime from '../components/books/anime.vue'
import fiction from '../components/books/fiction.vue'
import literature from '../components/books/literature.vue'
import tankuang from '../components/tankuang.vue'

Vue.use(Router)
const router =   new Router({
  routes: [
    {
      path: '/',
      name: 'HelloWorld',
      hide:true,
      component: HelloWorld
    },
    {
      path: '/lianxi',
      name: 'lianxi',
      hide:true,
      component: lianxi,
      
    },
    {
      path: '/tankuang',
      name: 'tankuang',
      hide:true,
      component: tankuang,
      
    },
    {
      path: '/houtai/:user',
      name: 'houtai',
      hide:true,
      component:houtai,
      children:[
        
      ]    
    },
    {
      name:'个人数据',
      path:'/shuiguo',
      component:houtai,
      children:[
        {path:'/huoqu/:user',name:'获取信息列表',component:huoqu},
        {path:'/add/:user',name:'添加信息',component:add},
        {path:'/exit/:user',name:'修改信息',component:exit},
        {path:'/del/:user',name:'删除信息',component:del}
      ]
    },
    {
      name:'书籍',
      path:'/shuji',
      component:houtai,
      children:[
        {path:'/dongman/:user',name:'anime',component:anime},
        {path:'/wenxue/:user',name:'fiction',component:fiction},
        {path:'/xiaoshuo/:user',name:'literature',component:literature},
      ]
    },
    
    
  ]
})
// router.catch(()=>{

// })
export default router
